const getters = {
  
      
    modePlays(state) { return state.mode },

    playing(state) { return state.playing },//加强强效

    likeList(state) { return state.likeList },

    sequencePlayList(state) { return state.sequencePlayList },

    currentIndex(state) { return state.currentIndex * 1 },

    progress(state) { return state.progress },

    PlayListLength(state) { return state.sequencePlayList.length },

    Highly(state) { return state.Highly },

    ListenRecentlyList(state) {
        if (state.ListenRecently.length == 300) {
            state.ListenRecently.pop()
            return state.ListenRecently
        }
        return state.ListenRecently
    },

    addSingerList(state) { return state.attentionSingerList },

    songList(state) { return state.songsList },

    History(state) {
        if (state.searchHistory.length == 12) {
            state.searchHistory.pop()
            return state.searchHistory
        }
        return state.searchHistory
    },

    currentSong(state) {
        if (state.currentIndex >= 0 && state.currentIndex < state.sequencePlayList.length) {
            return state.sequencePlayList[state.currentIndex];
        } else {
            return {}
        }
    },
}

export default getters

